;******************************************************************************
;* TMS320C6x C/C++ Codegen                                    PC Version 4.36 *
;* Date/Time created: Tue Jun 22 14:07:14 2004                                *
;******************************************************************************

;******************************************************************************
;* GLOBAL FILE PARAMETERS                                                     *
;*                                                                            *
;*   Architecture      : TMS320C64xx                                          *
;*   Optimization      : Enabled at level 2                                   *
;*   Optimizing for    : Speed                                                *
;*                       Based on options: -o2, no -ms                        *
;*   Endian            : Little                                               *
;*   Interrupt Thrshld : 100                                                  *
;*   Memory Model      : Large                                                *
;*   Calls to RTS      : Far                                                  *
;*   Pipelining        : Enabled                                              *
;*   Speculative Load  : Enabled                                              *
;*   Memory Aliases    : Presume not aliases (optimistic)                     *
;*   Debug Info        : COFF Debug                                           *
;*                                                                            *
;******************************************************************************

	.asg	A15, FP
	.asg	B14, DP
	.asg	B15, SP
	.global	$bss

	.file	"color_conv_image.c"

	.sect	".const"
	.align 8
_$T0$1:
	.field  	9539,16			; _$T0$1[0] @ 0
	.field  	13075,16			; _$T0$1[1] @ 16
	.field  	62326,16			; _$T0$1[2] @ 32
	.field  	58876,16			; _$T0$1[3] @ 48
	.field  	16525,16			; _$T0$1[4] @ 64

	.sect	".text"
	.sym	_$T0,_$T0$1, 51, 3, 80,, 5
;	c:\ti_6000\c6000\cgtools\bin\opt6x.exe -t -DI100 -v6400 -q -O2 C:\DOCUME~1\A03238~1.USA\LOCALS~1\Temp\TI3612_2 C:\DOCUME~1\A03238~1.USA\LOCALS~1\Temp\TI3612_5 -w . 

	.sect	".text"
	.global	_color_convert
	.sym	_color_convert,_color_convert, 32, 2, 0
	.func	62

;******************************************************************************
;* FUNCTION NAME: _color_convert                                              *
;*                                                                            *
;*   Regs Modified     : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,   *
;*                           A15,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,   *
;*                           B13,SP,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,  *
;*                           A26,A27,A28,A29,A30,A31,B16,B17,B18,B19,B20,B21, *
;*                           B22,B23,B24,B25,B26,B27,B28,B29,B30,B31          *
;*   Regs Used         : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,   *
;*                           A15,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,   *
;*                           B13,SP,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,  *
;*                           A26,A27,A28,A29,A30,A31,B16,B17,B18,B19,B20,B21, *
;*                           B22,B23,B24,B25,B26,B27,B28,B29,B30,B31          *
;*   Local Frame Size  : 0 Args + 132 Auto + 44 Save = 176 byte               *
;******************************************************************************

;******************************************************************************
;*                                                                            *
;* Using -g (debug) with optimization (-o2) may disable key optimizations!    *
;*                                                                            *
;******************************************************************************
_color_convert:
;** --------------------------------------------------------------------------*
	.line	6
	.sym	_in_image_luma_ev,4, 24, 17, 32, _image
	.sym	_in_image_cr_ev,20, 24, 17, 32, _image
	.sym	_in_image_cb_ev,6, 24, 17, 32, _image
	.sym	_in_image_luma_od,22, 24, 17, 32, _image
	.sym	_in_image_cr_od,8, 24, 17, 32, _image
	.sym	_in_image_cb_od,24, 24, 17, 32, _image
	.sym	_out_image,10, 24, 17, 32, _image
	.sym	_scratch_pad,26, 24, 17, 32, $$fake0
	.sym	_Cb,15, 28, 4, 32
	.sym	_Cr,14, 28, 4, 32
	.sym	_Y,13, 28, 4, 32
	.sym	_int_cb_ev,124, 18, 1, 32
	.sym	_int_cr_ev,120, 18, 1, 32
	.sym	_ext_CB,132, 28, 1, 32
	.sym	_ext_CR,128, 28, 1, 32
	.sym	_ext_Y,29, 28, 4, 32
	.sym	_id,11, 14, 4, 32
	.sym	_i,10, 4, 4, 32
	.sym	_cols,11, 4, 4, 32
	.sym	_rows,27, 4, 4, 32
	.sym	_in_image_luma_ev,4, 24, 4, 32, _image
	.sym	_in_image_cr_ev,116, 24, 1, 32, _image
	.sym	_in_image_cb_ev,15, 24, 4, 32, _image
	.sym	_scratch_pad,26, 24, 4, 32, $$fake0
	.sym	_i_luma_ev,4, 8, 1, 256, _dstr_t
	.sym	_i_cr_ev,36, 8, 1, 256, _dstr_t
	.sym	_i_cb_ev,68, 8, 1, 256, _dstr_t
	.sym	_coeffs,104, 51, 1, 80,, 5

           ADDK    .S2     -176,SP           ; |67| 
||         MV      .D1X    SP,A31            ; |67| 

           STW     .D2T1   A15,*+SP(176)

           STDW    .D1T1   A13:A12,*-A31(32)
||         STDW    .D2T2   B13:B12,*+SP(168)

           STDW    .D2T2   B11:B10,*+SP(160)
||         STDW    .D1T1   A11:A10,*-A31(40)

           STW     .D1T1   A14,*-A31(24)
||         STW     .D2T2   B3,*+SP(156)


           STW     .D2T2   B4,*+SP(116)      ; |67| 
||         MV      .D1     A6,A15            ; |67| 

	.line	17
           LDW     .D1T2   *+A4(8),B11       ; |78| 
	.line	18
           LDW     .D1T1   *+A4(4),A11       ; |79| 
           NOP             1
	.line	52
           LDW     .D2T2   *+B10(8),B6       ; |113| 
           NOP             2
           ADD     .D1     A11,A11,A8        ; |113| 
           NOP             1
           ADD     .D2X    A8,B6,B4          ; |113| 
           STW     .D2T2   B4,*+SP(120)      ; |113| 
	.line	53
           ADDAH   .D1     A11,A11,A3        ; |114| 
           NOP             1
           ADD     .D2X    B6,A3,B4          ; |114| 
           STW     .D2T2   B4,*+SP(124)      ; |114| 
	.line	70
           MVKL    .S2     _$T0$1,B4         ; |131| 
           MVKH    .S2     _$T0$1,B4         ; |131| 
           LDDW    .D2T1   *B4,A7:A6         ; |131| 
           LDH     .D2T1   *+B4(8),A3        ; |131| 
           NOP             2
           ADDAD   .D2     SP,13,B4          ; |131| 
           STDW    .D2T1   A7:A6,*B4         ; |131| 
           STH     .D2T1   A3,*+B4(8)        ; |131| 
	.line	79
           LDW     .D2T2   *B10,B13          ; |140| 
           NOP             2
	.line	80
           MVKL    .S2     0x2a300,B4        ; |141| 
           MVKH    .S2     0x2a300,B4        ; |141| 
           ADD     .D2     B4,B13,B4         ; |141| 
           STW     .D2T2   B4,*+SP(128)      ; |141| 
	.line	81
           MVKL    .S2     0x3f480,B4        ; |142| 
           MVKH    .S2     0x3f480,B4        ; |142| 
           ADD     .D2     B4,B13,B4         ; |142| 
           STW     .D2T2   B4,*+SP(132)      ; |142| 
	.line	88
           MPYLH   .M1X    A11,B11,A3        ; |149| 
           MPYLH   .M2X    B11,A11,B5        ; |149| 
           MPYU    .M2X    A11,B11,B4        ; |149| 

           MVKL    .S1     _dstr_open,A3     ; |149| 
||         ADD     .D2X    A3,B5,B5          ; |149| 

           MVKH    .S1     _dstr_open,A3     ; |149| 
           SHL     .S2     B5,16,B5          ; |149| 

           CALL    .S2X    A3                ; |149| 
||         ADD     .D2     B4,B5,B4          ; |149| 

           LDW     .D1T2   *A4,B4            ; |149| 
||         ADD     .D2     B4,B4,B5          ; |149| 

           MV      .D2X    A11,B8            ; |149| 
           MV      .D1X    B5,A13            ; |149| 
           MV      .D1X    B5,A6             ; |149| 

           ADDKPC  .S2     RL0,B3,0          ; |149| 
||         ADD     .D1X    4,SP,A4           ; |149| 
||         MV      .D2X    A8,B10            ; |149| 
||         ZERO    .L2     B12               ; |149| 
||         MVK     .S1     0x1,A12           ; |149| 
||         MVK     .L1     0x1,A10           ; |149| 

RL0:       ; CALL OCCURS                     ; |149| 
	.line	115
           SHR     .S2X    A11,1,B4          ; |176| 
           MV      .S2     B4,B8             ; |176| 

           MV      .D1X    B4,A14            ; |176| 
||         LDW     .D2T2   *+SP(116),B4      ; |176| 

           MVKL    .S1     _dstr_open,A3     ; |176| 
           MVKH    .S1     _dstr_open,A3     ; |176| 
           LDW     .D2T2   *+SP(120),B6      ; |176| 
           ADDAW   .D2     SP,9,B5           ; |176| 

           LDW     .D2T2   *B4,B4            ; |176| 
||         CALL    .S2X    A3                ; |176| 

           ADDKPC  .S2     RL1,B3,0          ; |176| 
           MV      .D1     A11,A8            ; |176| 
           MV      .D2X    A11,B10           ; |176| 
           MV      .S1     A13,A6            ; |176| 
           MV      .L1X    B5,A4             ; |176| 
RL1:       ; CALL OCCURS                     ; |176| 
	.line	142
           MVKL    .S2     _dstr_open,B5     ; |203| 
           MVKH    .S2     _dstr_open,B5     ; |203| 

           CALL    .S2     B5                ; |203| 
||         LDW     .D2T2   *+SP(124),B6      ; |203| 

           LDW     .D1T2   *A15,B4           ; |203| 
           ADDAW   .D2     SP,17,B7          ; |203| 
           ADDKPC  .S2     RL2,B3,0          ; |203| 
           MV      .D1X    B7,A4             ; |203| 

           MV      .D2X    A14,B8            ; |203| 
||         MV      .S1     A13,A6            ; |203| 
||         MV      .L1     A11,A8            ; |203| 

RL2:       ; CALL OCCURS                     ; |203| 
	.line	183
           CMPGT   .L2     B11,0,B0          ; |244| 
   [!B0]   BNOP    .S1     L3,3              ; |244| 
   [ B0]   LDW     .D2T2   *+SP(128),B12

   [ B0]   LDW     .D2T2   *+SP(132),B10
|| [ B0]   MVK     .S1     0x168,A12

           ; BRANCH OCCURS                   ; |244| 
;** --------------------------------------------------------------------------*
	.line	192
	.line	183
           ZERO    .D1     A10               ; |244| 
;*----------------------------------------------------------------------------*
;*   SOFTWARE PIPELINE INFORMATION
;*      Disqualified loop: Loop contains control code
;*----------------------------------------------------------------------------*
L1:    
	.line	192
           MVKL    .S1     _dstr_get_2D,A3   ; |253| 
           MVKH    .S1     _dstr_get_2D,A3   ; |253| 
           ADD     .D1X    4,SP,A4           ; |253| 
           CALL    .S2X    A3                ; |253| 
           ADDKPC  .S2     RL3,B3,4          ; |253| 
RL3:       ; CALL OCCURS                     ; |253| 
           MV      .D1     A4,A13            ; |253| 
	.line	193
           MVKL    .S1     _dstr_get_2D,A3   ; |254| 
           MVKH    .S1     _dstr_get_2D,A3   ; |254| 
           ADDAW   .D2     SP,9,B4           ; |254| 
           CALL    .S2X    A3                ; |254| 
           ADDKPC  .S2     RL4,B3,3          ; |254| 
           MV      .D1X    B4,A4             ; |254| 
RL4:       ; CALL OCCURS                     ; |254| 
           MV      .D1     A4,A14            ; |254| 
	.line	194
           MVKL    .S2     _dstr_get_2D,B4   ; |255| 
           MVKH    .S2     _dstr_get_2D,B4   ; |255| 
           CALL    .S2     B4                ; |255| 
           ADDAW   .D2     SP,17,B5          ; |255| 
           ADDKPC  .S2     RL5,B3,2          ; |255| 
           MV      .D1X    B5,A4             ; |255| 
RL5:       ; CALL OCCURS                     ; |255| 
           MV      .D1     A4,A15            ; |255| 
	.line	198
           MV      .D1     A10,A0
   [!A0]   BNOP    .S1     L2,2              ; |259| 
   [ A0]   MVKL    .S1     _DAT_wait,A3      ; |259| 
   [ A0]   MVKH    .S1     _DAT_wait,A3      ; |259| 
           NOP             1
           ; BRANCH OCCURS                   ; |259| 
;** --------------------------------------------------------------------------*
           CALL    .S2X    A3                ; |259| 
           ADDKPC  .S2     RL6,B3,3          ; |259| 
           MV      .D1     A11,A4            ; |259| 
RL6:       ; CALL OCCURS                     ; |259| 
;** --------------------------------------------------------------------------*
L2:    
	.line	200
           MVKL    .S1     _DAT_copy,A3      ; |261| 
           MVKH    .S1     _DAT_copy,A3      ; |261| 
           MVK     .S2     0x2d0,B4
           CALL    .S2X    A3                ; |261| 
           EXTU    .S2     B4,16,16,B5       ; |261| 
           ADDKPC  .S2     RL7,B3,0          ; |261| 
           MV      .D2     B13,B4            ; |261| 
           MV      .D1X    B5,A6             ; |261| 
           MV      .S1     A13,A4            ; |261| 
RL7:       ; CALL OCCURS                     ; |261| 
	.line	201
           MVKL    .S1     _DAT_copy,A3      ; |262| 
           MVKH    .S1     _DAT_copy,A3      ; |262| 
           MV      .D2     B12,B4            ; |262| 
           CALL    .S2X    A3                ; |262| 
           ADDKPC  .S2     RL8,B3,2          ; |262| 
           MV      .D1     A14,A4            ; |262| 
           EXTU    .S1     A12,16,16,A6      ; |262| 
RL8:       ; CALL OCCURS                     ; |262| 
	.line	202
           MVKL    .S2     _DAT_copy,B5      ; |263| 
           MVKH    .S2     _DAT_copy,B5      ; |263| 
           CALL    .S2     B5                ; |263| 
           ADDKPC  .S2     RL9,B3,1          ; |263| 
           MV      .D2     B10,B4            ; |263| 
           MV      .D1     A15,A4            ; |263| 
           EXTU    .S1     A12,16,16,A6      ; |263| 
RL9:       ; CALL OCCURS                     ; |263| 
           MV      .D1     A4,A11            ; |263| 
	.line	204
           SUB     .D1X    B11,1,A0          ; |265| 
   [ A0]   BNOP    .S1     L1,2              ; |265| 
           ADDK    .S2     720,B13           ; |265| 
           ADDK    .S2     360,B12           ; |265| 

           SUB     .D2     B11,1,B11         ; |265| 
||         ADDK    .S2     360,B10           ; |265| 
||         ADD     .D1     1,A10,A10         ; |265| 

           ; BRANCH OCCURS                   ; |265| 
;** --------------------------------------------------------------------------*
L3:    
	.line	212
           MVKL    .S1     _DAT_wait,A3      ; |273| 
           MVKH    .S1     _DAT_wait,A3      ; |273| 
           MV      .D1     A11,A4            ; |273| 
           CALL    .S2X    A3                ; |273| 
           ADDKPC  .S2     RL10,B3,4         ; |273| 
RL10:      ; CALL OCCURS                     ; |273| 
	.line	228
           LDW     .D2T2   *+SP(156),B3      ; |289| 
           LDW     .D2T1   *+SP(152),A14     ; |289| 
           LDW     .D2T1   *+SP(176),A15     ; |289| 
           LDDW    .D2T2   *+SP(160),B11:B10 ; |289| 
           LDDW    .D2T1   *+SP(144),A13:A12 ; |289| 

           RET     .S2     B3                ; |289| 
||         LDDW    .D2T2   *+SP(168),B13:B12 ; |289| 

           LDDW    .D2T1   *+SP(136),A11:A10 ; |289| 
           NOP             3
           ADDK    .S2     176,SP            ; |289| 
           ; BRANCH OCCURS                   ; |289| 
	.endfunc	289,03c08fc00h,176


;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES                                              *
;******************************************************************************
	.global	_dstr_get_2D
	.global	_DAT_copy
	.global	_DAT_wait
	.global	_dstr_open

;******************************************************************************
;* TYPE INFORMATION                                                           *
;******************************************************************************
	.sym	_Uint16, 0, 13, 13, 16
	.sym	_Uint32, 0, 14, 13, 32
	.stag	_dstr_t, 256
	.member	_x_data, 0, 18, 8, 32
	.member	_x_ofs, 32, 4, 8, 32
	.member	_x_size, 64, 14, 8, 32
	.member	_i_data, 96, 18, 8, 32
	.member	_i_ofs, 128, 13, 8, 16
	.member	_i_size, 144, 13, 8, 16
	.member	_w_size, 160, 13, 8, 16
	.member	_quantum, 176, 13, 8, 16
	.member	_multiple, 192, 13, 8, 16
	.member	_stride, 208, 13, 8, 16
	.member	_xfer_id, 224, 14, 8, 32
	.eos
	.sym	_dstr_t, 0, 8, 13, 256,_dstr_t
	.stag	_image, 96
	.member	_img_data, 0, 28, 8, 32
	.member	_img_cols, 32, 4, 8, 32
	.member	_img_rows, 64, 4, 8, 32
	.eos
	.sym	_IMAGE, 0, 8, 13, 96,_image
	.stag	$$fake0, 128
	.member	_ext_data, 0, 18, 8, 32
	.member	_ext_size, 32, 4, 8, 32
	.member	_int_data, 64, 18, 8, 32
	.member	_int_size, 96, 4, 8, 32
	.eos
	.sym	_SCRATCH_PAD, 0, 8, 13, 128,$$fake0
